package deng.log4j.examples;

import java.io.File;
import java.io.FileOutputStream;

/**
 * <p>Created on May 10, 2010</p>
 *
 * @author Zemian Deng <saltnlight5@gmail.com>
 */
public class FileDemo {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {
		File dir = new File("D:\\");
		File file = new File(dir, "test.log");

		if (file.exists()) {
			System.out.println("deleting existing file: " + file);
			file.delete();
		}
		
		FileOutputStream out = new FileOutputStream(file, false);
//		out.write("test".getBytes());
//		out.flush();
		out.close();
		
		System.out.println(file.exists());
	}

	// ========== Fields

	// ========== Constructors

	// ========== External Methods

	// ========== Internal Methods

	// ========== Getters and Setters

}
